<extend name="Public/base" />
<block name="content">
<script src="__STATIC__/aui-artDialog-9fd667e/dist/dialog.js"></script>
<script src="__STATIC__/aui-artDialog-9fd667e/dist/dialog-plus.js"></script>
<script src="__JS__/underscore.js"></script>
<link rel="stylesheet" href="__STATIC__/aui-artDialog-9fd667e/css/ui-dialog.css">
<script src="__JS__/jjhh.js?v={:C('TKE_VERSION')}"></script>

<style type="text/css">
	/*reset 模板内部表单样式 BEGIN*/
	.tpl_form .row-fluid{margin: 0;}
	.tpl_form .row-fluid .control-group{width: 150px;float: left;display:block;margin:0 15px 0 0;}
	.tpl_form .row-fluid .select-group{width: 150px;float: left;display: block;margin-right: 15px;}
	/*reset 模板内部表单样式 END*/
	.row-title{float: left;display:block;margin:5px; font-size:14px;width:100px;padding:0px 10px;border-left:2px solid #ccc;}
	.row-title-l2{margin-top:5px;}
	.input-text-group{width:150px;float: left;margin-left:31px;overflow: hidden;}
	.input-text-group label{float: left;padding:5px; font-size:14px;}
	.input-text-group input{float: left;width:120px;height: 14px;}

	.input-radio-group{}
	.input-radio-group label{padding:0 15px; margin-top:5px;}

	.indent{margin:5px 30px;}
	td{text-align: center;}
	.btn-view{position: fixed;top:100px;right:100px;background: rgba(0,0,0,0.6);color: #FFF;display: block;cursor: pointer;display: block;padding: 15px;}
	.btn-view:hover{color: #AAA;}
	#remarks{outline: none;resize:none;height:14px;line-height: 14px; overflow: hidden;width: 100%;min-width: 380px;}
</style>
<div id="content">
	<!-- 自由发挥区--开始 -->
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
			<a class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<div class="search-form fr cf">
			<div class="sleft">
				<input type="text" name="mobile_phone"  maxlength="11" class="search-input" value="{:strip_tags(I('mobile_phone'))}" placeholder="请输入用户手机号" style="margin-bottom:0;"><button class="btn btn-info" id="search_button" url="{:U('Quality/audit')}"><i class="icon-search icon-white"></i></button>
			</div>
		</div>
	<notempty name="Think.get.mobile_phone">
	<!-- 有数据的时候 -->
			<style type="text/css">
			.m-client{margin:15px 5px;}
			.m-client input{height: 14px;}
			.m-client .control-group{overflow: hidden;margin-right: 5px;}
			.m-client .control-group label{float: left;padding-right: 10px;}
			.m-client .control-group .controls{float: left;}
			.m-client .u-contact{display: none;}
			</style>
			<h6 class="text-info"><i class="icon-user"></i> 客户信息</h6>
			<div class="m-client">
				<div class="row-fluid">
					<div class="span12">
						<div style="clear:both"  class="m-table" id="house_list">
							<table class="table table-bordered">
								<tr>
									<td>姓名</td>
									<td>性别</td>
									<td>qq</td>
									<td>微信</td>
									<td>邮箱</td>
									<td>电话</td>
									<td>备注</td>
								</tr>
								<notempty name="customer_detail">
								<tr>
										<td>{$customer_detail.customer_name|default=''}</td>
										<td>
											<switch name="customer_detail['sex']">
												 <case value="0">未知</case>
												 <case value="1">男</case>
												 <case value="2">女</case>
											</switch>
										</td>
										<td>{$customer_detail.qq|default=''}</td>
										<td>{$customer_detail.wechat|default=''}</td>
										<td>{$customer_detail.mailbox|default=''}</td>
										<td>{$customer_detail.phone_number|default=''}</td>
										<td>{$customer_detail.remark|default=''}</td>
									</tr>
								<else/>
									<tr>
										<td colspan="7">
											<center>Oh~亲爱滴,该用户暂时没有信息～!</center>
										</td>
									</tr>
								</notempty>
								
								
							</table>
						</div>
					</div>
				</div>
				<!-- 房产信息 -->
				<div class="row-fluid">
					<div class="span12">
						<h6 class="text-info"><i class="icon-home"></i> 房产信息</h6>
						<div style="clear:both"  class="m-table" id="house_list">
							<table class="table table-bordered">
								<tr>
									<td>省</td>
									<td>市</td>
									<td>区</td>
									<td>小区</td>
									<td>交房时间</td>
									<td>装修平米数</td>
									<td>装修每平米（元）</td>
									<td>装修时间</td>
									<td>装修预算</td>
								</tr>
								<notempty name="house_list">
									<volist name="house_list" id="vo">
										<tr>
											<td>{$vo.province_id|getProvinceName}</td>
											<td>{$vo.city_id|getCityName}</td>
											<td>{$vo.ward_id|getWardName}</td>
											<td>{$vo.village_id|getVillageName}</td>
											<td>{$vo.home_time|time_format}</td>
											<td>{$vo.decoration_meter}</td>
											<td>{$vo.house_price}</td>
											<td>{$vo.decoration_time|time_format}</td>
											<td>{$vo.decoration_budget}</td>
										</tr>
									</volist>
								<else/>
									<tr>
										<td colspan="9">
											<center>Oh~亲爱滴,该用户暂时没有房产信息～!</center>
										</td>
									</tr>
								</notempty>
							</table>
						</div>
					</div>
				</div>
				<!-- /房产信息 -->
				<!-- 装修需求 -->
				<div class="row-fluid" id="demand_list"></div>
				<!-- 装修需求 -->
				<!-- 操作记录 -->
					<h6 class="text-info"><i class="icon-th-list"></i> 操作记录</h6>
					<table class="table table-bordered">
								<tr>
									<td>操作人</td>
									<td>操作时间</td>
									<td>操作纪录</td>
								</tr>
								<notempty name="_list">
									<volist name="_list" id="vo">
										<tr>
											<td>{$vo.member_id|getUserName}</td>
											<td>{$vo.create_time|time_format}</td>
											<td>{$vo.remark}</td>
										</tr>
									</volist>
								<else/>
									<tr>
										<td colspan="3">
											<center>Oh~亲爱滴,该用户暂时没有房产信息～!</center>
										</td>
									</tr>
								</notempty>
					</table>
					<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
							{$_page}
					</div>
				<!--/ 操作记录 -->
			</div>
	<!-- /有数据结束 -->
	<else/>
	<!-- 没数据 -->
		<div class="widget-box">
			<div class="widget-content ">
				<center>Oh~亲爱滴,请输入用户手机号查询用户信息～!</center>
			</div>
		</div>
	<!-- /没数据 -->
	</notempty>
	</div>
	<!-- 自由发挥区--结束 -->
</div>
<script type="text/javascript">
$("#j-contact-toggle").on("click", function(){
	$("#j-contact").fadeIn(500);
});
$("#remarks").focus(function() {
	$(this).stop().animate({"height": "100px", "width": "560px"}, 300);
}).blur(function() {
	$(this).stop().animate({"height": "14px", "width": "380px"}, 300);
});
$(function(){
	window.dialog = dialog;
	//需求加载
	$.ajax({ url: "{:U('ServiceStatistics/getDemandList')}", data: { demand_value : '{$demand_value}'} , success: function(data){
		if('' != data){
        	$('#demand_list').html(data).hide().fadeIn(500);
		}
      	//初始化控件
        var IS_INIT = 1;
     	// 全选
        $(".checkbox-all").bind("click",function(){
            $(this).nextAll("div.checkbox-group").children("label").children("input").prop("checked", true);
        });
        // 反选
        $(".checkbox-opposite").bind("click",function(){
            $(this).nextAll("div.checkbox-group").children("label").children("input[type=checkbox]").each(function(e) {
                if ($(this).is(":checked")) {
                    $(this).prop("checked", false);
                }else{
                    $(this).prop("checked", true);
                }
            });
        });
	}});
	    //初始化日期选择器
	    $(".datepicker").datetimepicker({
	        format: 'yyyy-mm-dd',
	        minView: 'month',
	        autoclose: true,
	        todayBtn: true
	    });
// == END ==
});
//导航高亮
highlight_subnav("{:U('Quality/audit')}");
</script>
</block>
